<html>
<head>
    @include('v1.common.meta')
    <link rel="stylesheet" href="{{elixir('css/profile.css')}}">
</head>
<body>
<div class="yjs-grid">
    <div class="yjs-grid-box">
        <div class="layui-tab">
            @if(Auth::check())
                <div class="layui-container">
                    <div class="layui-row hidden-tips">
                        <div class="layui-col-md12">
                            <blockquote class="layui-elem-quote">
                                温馨提示：{{$profileData['name']}}@if($isAdmin===1)维修员 @else管理员 @endif, 存在"<i
                                        class="layui-icon">&#xe605;</i>"标识的表单项，建议您自主编辑维护。
                            </blockquote>
                        </div>
                    </div>
                    <div class="layui-row">
                        <div class="layui-col-md9">
                            <fieldset class="layui-elem-field">
                                <legend>个人信息维护</legend>
                                <div class="layui-field-box">
                                    <div class="layui-form layui-form-pane" name="profileForm" action="javascript:;"
                                         method="POST">
                                        <input type="hidden" name="isAdmin" value="{{$isAdmin}}">
                                        <input type="hidden" name="code" value="{{$profileData['code']}}">
                                        <div class="layui-row">
                                            <div class="layui-col-md6">
                                                <div class="layui-form-item">
                                                    <label class="layui-form-label">登录账号</label>
                                                    <div class="layui-input-inline">
                                                        <input type="text" value="{{$profileData['code']}}" disabled
                                                               class="layui-input">
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="layui-col-md6">
                                                <div class="layui-form-item">
                                                    <label class="layui-form-label">真实姓名</label>
                                                    <div class="layui-input-inline">
                                                        <input type="text" value="{{$profileData['name']}}" disabled
                                                               class="layui-input">
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="layui-row">
                                            <div class="layui-col-md6">
                                                <div class="layui-form-item">
                                                    <label class="layui-form-label"><i class="layui-icon">&#xe605;</i>手机号码</label>
                                                    <div class="layui-input-inline">
                                                        <input type="text" name="mobile"
                                                               value="{{$profileData['mobile']}}"
                                                               lay-verify="required|checkMobile"
                                                               placeholder="请输入手机号码" class="layui-input">
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="layui-col-md6">
                                                <div class="layui-form-item">
                                                    @if($isAdmin===1)
                                                        <label class="layui-form-label"><i
                                                                    class="layui-icon">&#xe605;</i>办公电话</label>
                                                        <div class="layui-input-inline">
                                                            <input type="text" name="telephone"
                                                                   value="{{$profileData['telephone']}}"
                                                                   lay-verify="required|checkTelephone"
                                                                   placeholder="请输入办公电话"
                                                                   class="layui-input">
                                                        </div>
                                                    @else

                                                    @endif
                                                </div>
                                            </div>
                                        </div>
                                        <div class="layui-row">
                                            <div class="layui-col-md12">
                                                <div class="layui-form-item">
                                                    <label class="layui-form-label"><i class="layui-icon">&#xe605;</i>电子邮件</label>
                                                    <div class="layui-input-inline">
                                                        <input type="text" name="email"
                                                               value="{{$profileData['email']}}"
                                                               lay-verify="required|checkEmail"
                                                               autocomplete="off"
                                                               placeholder="请输入电子邮件" class="layui-input">
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        {{--<div class="layui-row">--}}
                                            {{--<div class="layui-col-md6">--}}
                                                {{--<div class="layui-form-item">--}}
                                                    {{--<label class="layui-form-label">验证码</label>--}}
                                                    {{--<div class="layui-input-inline">--}}
                                                        {{--<input type="text" name="captcha" maxlength="4"--}}
                                                               {{--lay-verify="required"--}}
                                                               {{--placeholder="请输入图片验证码" autocomplete="off"--}}
                                                               {{--class="layui-input">--}}
                                                    {{--</div>--}}
                                                {{--</div>--}}
                                            {{--</div>--}}
                                            {{--<div class="layui-col-md4">--}}
                                                {{--<div class="layui-form-item">--}}
                                                    {{--<img class="getLVcode" src="{{ captcha_src('mini') }}" width="70px"--}}
                                                         {{--height="34px" style="border: 1px solid green;"/>--}}
                                                    {{--<div class="layui-form-mid layui-word-aux fr">--}}
                                                        {{--点击图片刷新验证码--}}
                                                    {{--</div>--}}
                                                {{--</div>--}}
                                            {{--</div>--}}
                                            {{--<div class="layui-col-md2">--}}
                                                {{--&nbsp;--}}
                                            {{--</div>--}}
                                        {{--</div>--}}
                                        <div class="layui-row">
                                            <div class="layui-col-md1">
                                                <button type="submit" class="layui-btn layui-btn-normal"
                                                        lay-filter="okEvent" lay-submit>确 认
                                                </button>
                                            </div>
                                            <div class="layui-col-md1">
                                                &nbsp;
                                            </div>
                                            <div class="layui-col-md1">
                                                <button type="button" class="layui-btn layui-btn-primary cancelEvent">取
                                                    消
                                                </button>
                                            </div>
                                            <div class="layui-col-md9">
                                                &nbsp;
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </fieldset>
                        </div>
                        <div class="layui-col-md3">
                            <fieldset class="layui-elem-field">
                                <legend>头像编辑</legend>
                                <div class="layui-field-box">
                                    <div class="layui-row">
                                        <div class="layui-col-md12">
                                            <div class="layui-collapse">
                                                <div class="layui-colla-item">
                                                    <h2 class="layui-colla-title">限制规则：</h2>
                                                    <div class="layui-colla-content">
                                                        <p>1.要求：本人正面照片，内容合规合法；</p>
                                                        <p>2.格式：jpg、png、bmp、jpeg</p>
                                                        <p>3.尺寸：91x91</p>
                                                        <p>4.大小：少于2MB</p>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="layui-row">
                                        <div class="layui-col-md1">
                                            &nbsp;
                                        </div>
                                        <div class="layui-col-md10">
                                            <div class="layui-upload-drag" id="avatar">
                                                <i class="layui-icon">&#xe681;</i>
                                                <p>点击上传，或将文件拖拽到此处</p>
                                            </div>
                                        </div>
                                        <div class="layui-col-md1">
                                            &nbsp;
                                        </div>
                                    </div>
                                    <div class="layui-row">
                                        <div class="layui-col-md3">
                                            &nbsp;
                                        </div>
                                        <div class="layui-col-md6">
                                            <div class="layui-upload-list yjs-user-photo"
                                                 id="avatarViewer">
                                                <img class="layui-upload-img" layer-src="{{$profileData['avatar']}}"
                                                     layer-pid="" src="{{$profileData['avatar']}}"
                                                     alt="{{$profileData['name']}}">
                                                <div class="yjs-user-photo-edit">点击查看原图</div>
                                            </div>
                                        </div>
                                        <div class="layui-col-md3">
                                            &nbsp;
                                        </div>
                                    </div>
                                </div>
                            </fieldset>
                        </div>
                    </div>
                </div>
            @else
                <div class="layui-container">
                    <div class="layui-row">
                        <div class="layui-col-md12">
                            <blockquote class="layui-elem-quote-error">
                                友情提示：该功能只面向已成功登录系统，并具有相应权限的用户可用。
                            </blockquote>
                        </div>
                    </div>
                </div>
            @endif
        </div>
    </div>
</div>

@include('v1.common.js')
<script src="{{elixir('js/profile.js')}}"></script>
</body>
</html>